package com.example.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.entity.Video;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

public interface VideoService extends IService<Video> {

    /**
     * 课程收藏
     * @param videoId
     * @return
     */
    Integer thumbVideo(@Param("videoId") Integer videoId);

    Integer addVideo(@Param("videoTitle") String videoTitle,
                     @Param("videoUrl") MultipartFile videoUrl,
                     @Param("courseId") Integer courseId,
                     HttpServletRequest request);

    Page<Video> selectVideoPage(@Param("name") String  name,
                                @Param("page") Integer page ,
                                @Param("size") Integer size);

    Integer deleteById(@Param("id") Integer id);
}
